<!DOCTYPE html>
<html>
<head>
    <title>测试按钮功能</title>
</head>
<body>
    <h1>测试按钮功能</h1>
    <button id="test-btn">点击测试</button>
    <div id="result"></div>

    <script>
        document.getElementById('test-btn').addEventListener('click', function() {
            document.getElementById('result').innerHTML = '<p>按钮点击成功！时间：' + new Date().toLocaleString() + '</p>';
            console.log('按钮被点击了');
        });
    </script>
</body>
</html>